home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 43.zip / ANC 15.adf / REXX / listitem.txed < prev    next >
Text File  |  1987-01-01  |  1KB  |  54 lines

  1. /* LISTITEM.txed
  2.     This is a TxEd Plus / AREXX macro.
  3.     It will add an item from the current window into the
  4.     TXLIST window.  If no TXLIST window is open, this macro will
  5.     start a new TxEd Plus invocation using LISTINIT as the
  6.     startup macro.
  7.  
  8.     Note this macro allows up to ten lines above the cursor, and a total
  9.     of 15 lines, to be copied.  Adjust the two "do" loops for different
  10.     size limits  NOTE - THIS MACRO REQUIRES THE COMPLETE AREXX.
  11.  */
  12.  
  13. Daporte = getclip("TxLIST")
  14. if ( Daporte = "" ) then do
  15.     MSG "Creating list window"
  16.     ADDRESS COMMAND E TEMPFILE STARTUP LISTINIT
  17.     ADDRESS COMMAND WAIT 2
  18.  
  19.     Daporte = getclip("TxLIST")
  20.     if ( Daporte = "" ) then do
  21.         MSG "List Window Not Found!"
  22.         exit(20)
  23.         end
  24.     end
  25.  
  26. LOCK
  27. OPTIONS RESULTS
  28.  
  29. do i=0 to 10
  30.     'SOL'
  31.     'MARK 1'
  32.     'UP'
  33.     if ( RC > 0) then leave i
  34.     'STATUS L'
  35.     if length(RESULT) <=1 then leave i
  36. end i
  37.  
  38. do j=0 to 15
  39.     'DOWN'
  40.     'Status L'
  41.     if length(RESULT) <=1 then leave j
  42. end j
  43.  
  44. 'REDISPLAY'
  45. 'COPY'
  46. 'TOP'
  47.  
  48. ADDRESS VALUE Daporte
  49.  
  50. 'BOTTOM'
  51. 'INSERT *N'
  52. 'PASTE'
  53.  
  54.